﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using ZXing.QrCode.Internal;
using ZXing;
using ZXing.Common;
using System.Drawing.Imaging;

namespace MyWcfRestSvc
{
    class QRCode
    {
        public static void Encoder(string content, string fileName)
        {
            var writer = new BarcodeWriter
            {
                Format = BarcodeFormat.QR_CODE,
                Options = new EncodingOptions
                {
                    Height = 256,
                    Width = 256
                }
            };
            Image image = writer.Write(content);
            image.Save(fileName, ImageFormat.Png);
        }
    }
}
